const mongoose = require('../connect');

const moment =  require('moment');

const userSchema =new mongoose.Schema ({
    username:{
        type:String,
        required:true,
    },
    pwd:{
        type:String,
        required:true,
    },
    profile:{
        type:String,
        required:true,
    },
    create_time:{
        type:String,
        default:()=>moment().format('YYYY-MM-DD HH:mm:ss')
    }
},{versionKey:false})

const userModel = mongoose.model('users',userSchema);

module.exports = userModel;

